<?php
namespace Purse\Model;
use Think\Model;
class CrowdfundModel extends Model {
	protected $connection = 'DB_BASE_DSN';
	protected $tableName = 'qyx_crowdfund'; 
	
	public function addCrowdfund($data){
		$result = $this->add($data);
		return $result;
	}
	
	
	public function updateCrowdfund($data){
		$map['fundid'] = $data['fundid'];
		$data['updatetime'] = date("Y-m-d H:i:s");
		$result = $this->where($map)->save($data);
		return $result;
	}
	
	
	public function getCrowdfundById($fundid){
		$map['fundid'] = $fundid;
		$result = $this->where($map)->find();
		return $result;
	}
}


